package net.ericaro.neojavagen.blocks;

/**
 * <b>DoStatement</b> ::= "do" <{@link net .ericaro .neojavagen .blocks .Statement Statement}> "while" "(" <
 * {@link net .ericaro .neojavagen .expressions .Expression Expression}> ")" ";"
 * 
 * @author eric@ericaro.net
 */
public class DoStatement extends net.ericaro.neojavagen.JavaPartComposition implements net.ericaro.neojavagen.blocks.StatementWithoutTrailingSubstatement {
	private net.ericaro.neojavagen.expressions.Expression expression;

	private net.ericaro.neojavagen.blocks.Statement statement;

	public DoStatement(net.ericaro.neojavagen.blocks.Statement statement, net.ericaro.neojavagen.expressions.Expression expression) {
		super();
		this.statement = statement;
		this.expression = expression;
	}

	public net.ericaro.neojavagen.expressions.Expression getExpression() {
		return expression;
	}

	public net.ericaro.neojavagen.blocks.Statement getStatement() {
		return statement;
	}

	public void setExpression(net.ericaro.neojavagen.expressions.Expression expression) {
		this.expression = expression;
	}

	public void setStatement(net.ericaro.neojavagen.blocks.Statement statement) {
		this.statement = statement;
	}

	@Override
	public java.lang.String toString() {
		return print("do", statement, "while", "(", expression, ")", ";");
	}
}
